import React,{Component} from 'react'
import {connect} from 'react-redux'
import {
    RecommendWrapper,
    RecommerndItem
} from '../style'


class Recommer extends Component{
    render(){
        const {recommendList} = this.props
        return (
            <RecommendWrapper>
                {
                    recommendList.map((items,index) => (
                        <RecommerndItem key={items.get('id')} imgUrl={items.get('url')}></RecommerndItem>
                    ))
                }
            </RecommendWrapper>
        )
    }
}
const mapState = (state) => {
    return {
        recommendList:state.getIn(['home','recommendList'])
    }
}

export default connect(mapState,null)(Recommer)